﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OUserList.aspx.cs" Inherits="YWTSSys.Web.MachineSys.SysBasic.OUserList" %>

<form id="pagerForm" method="post" action="SysBasic/OUserList.aspx">
<input type="hidden" name="RealName" value="<%=RealName %>" />
<input type="hidden" name="orderField" value="<%=orderField %>" />
<input type="hidden" name="orderDirection" value="<%=orderDirection %>" />
<input type="hidden" name="pageNum" value="1" />
<input type="hidden" name="numPerPage" value="<%=numPerPage %>" />
</form>
<form id="form1" runat="server" method="post" action="SysBasic/OUserList.aspx" onsubmit="return navTabSearch(this);">
<div class="pageHeader">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    真实名称： <input name="RealName" type="text" value="<%=RealName %>"  />
                </td>
                <td>
                    <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
        
    </div>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <% if(HasPower(YWTSSys.Web.Permission.新增)) {%>
            <li><a class="add" href="SysBasic/OUserAdd.aspx" target="dialog"  title="添加员工"><span>添加</span></a></li>
            <%} %>
             <% if(HasPower(YWTSSys.Web.Permission.删除)) {%>
            <li><a class="delete" href="sysAjaxDone.ashx?ajaxmethod=DeleteUser&UserId={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
             <%} %>
              <% if(HasPower(YWTSSys.Web.Permission.修改)) {%>
            <li><a class="edit" href="SysBasic/OUserEdit.aspx?UserId={sid_user}" target="dialog" title="修改员工"><span>修改</span></a></li>
            <%} %>
            <% if(HasPower(YWTSSys.Web.Permission.修改)) {%>
            <li><a class="icon" href="SysBasic/OUser_RestPwd.aspx?UserId={sid_user}" target="dialog" max=false  mask=true  maxable=false  minable=false  resizable=false drawable=true  width="520" height="250" title="修改密码"><span>修改密码</span></a></li>
            <%} %>
            <% if (HasPower(YWTSSys.Web.Permission.员工管理_状态))
               {%>
            <li><a class="icon" href="sysAjaxDone.ashx?ajaxmethod=disableduser&UserId={sid_user}" target="ajaxTodo"  title="确定要禁用此员工帐户吗?"><span>禁用</span></a></li>
            <%} %>
            <% if (HasPower(YWTSSys.Web.Permission.员工管理_状态))
               {%>
            <li><a class="icon" href="sysAjaxDone.ashx?ajaxmethod=enableduser&UserId={sid_user}" target="ajaxTodo"  title="确定要启用此员工帐户吗?"><span>启用</span></a></li>
            <%} %>
        </ul>
    </div>
    <asp:repeater id="rpMenu" runat="server">
        <HeaderTemplate>
        <table class="table" width="100%" layouth="115">
        <thead>
            <tr  >                
                <th width="70" <%=GetDataListOrder("UserName") %>>
                    登陆帐户
                </th>
                <th width="70" <%=GetDataListOrder("RealName") %>>
                    真实姓名
                </th>
                <th <%=GetDataListOrder("Department") %>>
                    部门
                </th>
                <th width="80" <%=GetDataListOrder("Mobile") %>>
                    手机
                </th>
                 <th width="80" <%=GetDataListOrder("Email") %>>
                    邮箱
                </th>                
                 <th width="70" <%=GetDataListOrder("RoleName") %>>
                    角色
                </th>
                <th width="70" <%=GetDataListOrder("State") %>>
                    状态
                </th>
                <th width="80" <%=GetDataListOrder("LastLogin") %>>
                    最近登陆
                </th>               
                          
            </tr>
        </thead>
        <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr target="sid_user" rel="<%# Eval("UserId") %>">                
				<td><%# Eval("UserName")%></td>
				<td><%# Eval("RealName")%></td>
                <td><%# Eval("Department")%></td>
                <td><%# Eval("Mobile")%></td>
				<td><%# Eval("Email")%></td>
                <td><%# Eval("RoleName")%></td>
				<td><%# Eval("State").ToString()=="1"?"<b style='color:red'>禁用</b>":"正常"%></td>
				<td><%# Eval("LastLogin") is DBNull?"":Convert.ToDateTime( Eval("LastLogin")).ToString("yyyy-MM-dd HH:mm")%></td>			
			</tr>
        </ItemTemplate>
        <FooterTemplate>
            </tbody>
         </table>
        </FooterTemplate>
    </asp:repeater>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
               <%=SetnumPerPage() %>
            </select>
            <span>条，共<%=TotalCount%>条</span>
        </div>
        <div class="pagination" targettype="navTab" totalcount="<%=TotalCount%>" numperpage="<%=numPerPage %>"
            pagenumshown="10" currentpage="<%=pageNum %>">
        </div>
    </div>
</div>
</form>
